<template>
  <div class="home-container">
    <el-card class="welcome-card">
      <h1 class="welcome-title">欢迎来到系统</h1>
      <p class="welcome-message">您已成功登录！</p>
      <el-button 
        type="primary" 
        @click="handleLogout"
        class="logout-button"
      >
        退出登录
      </el-button>
    </el-card>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const handleLogout = () => {
  localStorage.removeItem('isAuthenticated')
  router.push('/login')
}
</script>

<style scoped>
.home-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.welcome-card {
  width: 500px;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.welcome-title {
  color: #8a2be2;
  margin-bottom: 20px;
}

.welcome-message {
  color: #666;
  margin-bottom: 30px;
}

.logout-button {
  background-color: #8a2be2;
  border-color: #8a2be2;
}

.logout-button:hover {
  background-color: #9932cc;
  border-color: #9932cc;
}
</style>